package com.taxshare.seller.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.taxshare.mybatis.entity.BaseEntity;
import com.taxshare.seller.constant.table.TableConstant;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author YANG
 * @date 2021/3/25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(TableConstant.T_SELLER_INVOICE_DETAIL)
@ApiModel(description = "发票明细")
public class SellerInvoiceDetailEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("uuid")
    @ApiModelProperty("主键")
    private String uuid;

    @TableField("serial_no")
    @ApiModelProperty("发票请求流水号")
    private String serialNo;

    @TableField("goods_name")
    @ApiModelProperty("商品名称")
    private String goodsName;

    @TableField("model")
    @ApiModelProperty("规格型号")
    private String model;

    @TableField("unit")
    @ApiModelProperty("单位")
    private String unit;

    @TableField("goods_number")
    @ApiModelProperty("数量")
    private String goodsNumber;

    @TableField("unit_price")
    @ApiModelProperty("单价")
    private String unitPrice;

    @TableField("goods_sum")
    @ApiModelProperty("不含税金额")
    private String goodsSum;

    @TableField("tax_rate")
    @ApiModelProperty("税率")
    @NotBlank(message = "税率不能为空")
    @Pattern(regexp = "0.\\d{1,2}$|0", message = "税率错误")
    private String taxRate;

    @TableField("goods_tax")
    @ApiModelProperty("税额")
    private String goodTax;

    @TableField("goods_sum_tax")
    @ApiModelProperty("含税金额")
    private String goodsSumTax;

    @TableField("tax_rate_mark")
    @ApiModelProperty("零税率标识（空为正常税率，1，是免税2，是不征税 3普通零税率）")
    private String taxRateMark;

    @TableField("preferential_mark")
    @ApiModelProperty("优惠政策标识（0无优惠政策 1有优惠政策）")
    private String preferentialMark;

    @TableField("preferential_name")
    @ApiModelProperty("优惠政策名称")
    private String preferentialName;

    @TableField("tax_code")
    @ApiModelProperty("税收分类编码")
    private String taxCode;

    @TableField("invoice_row_nature")
    @ApiModelProperty("发票行性质")
    private String invoiceRowNature;

    @TableField("detail_no")
    @ApiModelProperty("明细行序号")
    private String detailNo;

    @TableField("tax_sign")
    @ApiModelProperty(value = "含税标志")
    private String taxSign;

    @TableField("red_mark")
    @ApiModelProperty(value = "是否红冲标志")
    private String redMark;

    @ApiModelProperty(value = "纳税人识别号")
    @TableField(exist = false)
    private String sellerTaxNo;

    @ApiModelProperty(value = "增值税特殊管理")
    @TableField(exist = false)
    private String zzstsgl;

    @ApiModelProperty(value = "发票序号")
    @TableField("invoice_sort")
    private int invoiceSort;

    @ApiModelProperty(value = "车辆类型")
    @TableField("car_category_name")
    private String carCategoryName;

    @ApiModelProperty(value = "厂牌型号")
    @TableField("brand_mode")
    private String brandMode;

    @ApiModelProperty(value = "产地")
    @TableField("production_place_name")
    private String productionPlaceName;

    @ApiModelProperty(value = "生产企业名称")
    @TableField("production_company_name")
    private String productionCompanyName;

    @ApiModelProperty(value = "合格证号")
    @TableField("certificate_num")
    private String certificateNum;

    @ApiModelProperty(value = "进口证明书号")
    @TableField("import_testimonial_num")
    private String importTestimonialNum;

    @ApiModelProperty(value = "发动机号码")
    @TableField("engine_num")
    private String engineNum;

    @ApiModelProperty(value = "车辆识别代号/车架号码")
    @TableField("car_discern_code")
    private String carDiscernCode;

    @ApiModelProperty(value = "吨位")
    @TableField("tonnage")
    private String tonnage;

    @ApiModelProperty(value = "限乘人数")
    @TableField("maximum_people")
    private String maximumPeople;

    @ApiModelProperty(value = "商检单号")
    @TableField("Inspection_odd")
    private String inspectionOdd;

    @ApiModelProperty(value = "电话")
    @TableField("telephone")
    private String telephone;

    @ApiModelProperty(value = "身份证号码")
    @TableField("id_card_no")
    private String idCardNo;

    @ApiModelProperty(value = "税务机关名称")
    @TableField("tax_of_name")
    private String taxOfName;

    @ApiModelProperty(value = "税务机关代码")
    @TableField("tax_of_code")
    private String taxOfCode;

    @ApiModelProperty(value = "开票机号")
    @TableField("machin_no")
    private String machinNo;

}
